<template>
  <div class="app">
    <router-view></router-view>
  </div>
</template>

<script lang="ts">
export default {
  name: "App",
};
</script>
<script setup lang="ts">
import { GETDARK } from "./utils/local";
onMounted(() => {
  if (GETDARK()) {
    document.documentElement.className = "dark";
  } else {
    document.documentElement.className = "";
  }
});
</script>
<style lang="scss">
@import "@/styles/data_picker.scss";
@import "@/styles/dialog.scss";
.app {
  width: 100%;
  height: 100vh;
}

.select_box {
  border-color: transparent !important;
  background-color: #042252 !important;

  &.is-focus {
    border-color: #89b5d8 !important;
    box-shadow: 0 0 0 1px rgba(108, 156, 193, 0.3);
  }
}

.el-select-dropdown {
  background-color: #042252 !important;
  border: transparent !important;

  .el-select-dropdown__item {
    color: #ffffff !important;

    &:hover,
    &.hover {
      background-color: #0a3573 !important;
    }

    &:not(:hover) {
      background-color: transparent !important;
    }

    &.selected {
      background-color: #0d4494 !important;
      color: #ffffff !important;
    }

    &.is-disabled {
      color: #8c8c8c !important;
      cursor: not-allowed;

      &:hover {
        background-color: transparent !important;
      }
    }
  }
}

.el-notification {
  background: linear-gradient(180deg,
      rgba(22, 30, 45, 0.9) 0%,
      rgba(18, 28, 40, 0.95) 50%,
      rgba(15, 25, 38, 0.9) 100%) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(35, 85, 140, 0.5) !important;
  box-shadow: inset 0 0 30px rgba(0, 140, 255, 0.08),
    0 0 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 150, 255, 0.1);
  word-break: break-all;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  animation: notification-pulse 3s infinite alternate ease-in-out;
  transform-origin: center right;

  /* 顶部扫描线 */
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 180, 255, 0.7),
        transparent);
    opacity: 0.7;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 180, 255, 0.5);
    animation: flow-light 3s infinite ease-in-out;
  }

  /* 网格背景 */
  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(40, 100, 180, 0.03) 1px,
        transparent 1px),
      linear-gradient(90deg, rgba(40, 100, 180, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
  }

  /* 左侧边缘光效 */
  .side-beam {
    content: "";
    position: absolute;
    left: 0;
    top: 30%;
    bottom: 30%;
    width: 2px;
    background: linear-gradient(180deg,
        transparent,
        rgba(0, 180, 255, 0.8),
        transparent);
    border-radius: 0 2px 2px 0;
    opacity: 0.8;
    z-index: 5;
  }

  /* 角落装饰 */
  .corner-decoration {
    position: absolute;
    width: 12px;
    height: 12px;
    z-index: 5;
    pointer-events: none;

    &.top-left {
      top: 0;
      left: 0;
      border-top: 2px solid rgba(0, 180, 255, 0.7);
      border-left: 2px solid rgba(0, 180, 255, 0.7);
      border-top-left-radius: 2px;
    }

    &.top-right {
      top: 0;
      right: 0;
      border-top: 2px solid rgba(0, 180, 255, 0.7);
      border-right: 2px solid rgba(0, 180, 255, 0.7);
      border-top-right-radius: 2px;
    }

    &.bottom-right {
      bottom: 0;
      right: 0;
      border-bottom: 2px solid rgba(0, 180, 255, 0.7);
      border-right: 2px solid rgba(0, 180, 255, 0.7);
      border-bottom-right-radius: 2px;
    }

    &.bottom-left {
      bottom: 0;
      left: 0;
      border-bottom: 2px solid rgba(0, 180, 255, 0.7);
      border-left: 2px solid rgba(0, 180, 255, 0.7);
      border-bottom-left-radius: 2px;
    }
  }

  .el-notification__title {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    position: relative;
    z-index: 2;
    font-family: PingFang SC;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(0, 180, 255, 0.4);
    animation: text-glow 3s infinite alternate;

    &::after {
      content: "";
      position: absolute;
      bottom: -2px;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg,
          transparent,
          rgba(0, 180, 255, 0.5),
          transparent);
      opacity: 0.7;
    }
  }

  .el-notification__content {
    color: rgba(255, 255, 255, 0.85) !important;
    white-space: pre-wrap;
    position: relative;
    z-index: 2;
    font-family: PingFang SC;
    font-size: 14px;
  }

  .el-notification__closeBtn {
    color: rgba(0, 180, 255, 0.8) !important;
    transition: all 0.3s;
    position: relative;
    z-index: 3;

    &:hover {
      color: rgba(0, 220, 255, 1) !important;
      transform: rotate(90deg);
      text-shadow: 0 0 8px rgba(0, 180, 255, 0.8);
    }
  }

  .el-notification__icon {
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 3px rgba(0, 180, 255, 0.8));
  }
}

@keyframes notification-pulse {
  0% {
    box-shadow: inset 0 0 25px rgba(0, 140, 255, 0.08),
      0 0 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 150, 255, 0.1);
  }

  100% {
    box-shadow: inset 0 0 35px rgba(0, 140, 255, 0.12),
      0 0 20px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 150, 255, 0.15);
  }
}

@keyframes flow-light {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 0.9;
  }

  100% {
    opacity: 0.7;
  }
}

@keyframes text-glow {
  0% {
    text-shadow: 0 0 8px rgba(0, 180, 255, 0.4);
  }

  100% {
    text-shadow: 0 0 16px rgba(0, 180, 255, 0.8);
  }
}

//首页下拉菜单
.dropdownPop {
  width: 150px;
  background-color: #0b2648 !important;
}

.el-dropdown__popper.el-popper {
  border: none !important;

  .el-popper__arrow {
    display: none !important;
  }
}

.el-dropdown-menu {
  position: relative;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-image: linear-gradient(to right,
        rgba(0, 180, 255, 0) 0%,
        rgba(0, 180, 255, 0.5) 25%,
        rgba(0, 180, 255, 0.8) 50%,
        rgba(0, 180, 255, 0.5) 75%,
        rgba(0, 180, 255, 0) 100%) 1;
    pointer-events: none;
    animation: border-flow 4s linear infinite;
  }
}

.el-dropdown-menu__item {
  color: rgba(255, 255, 255, 0.85) !important;
  justify-content: center;
  font-family: PingFang SC !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  line-height: 22px !important;
  text-align: left !important;
  font-style: normal !important;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;

  &:hover {
    background: rgba(0, 180, 255, 0.15) !important;
    text-shadow: 0 0 8px rgba(0, 180, 255, 0.6);
    color: rgba(255, 255, 255, 1) !important;
  }

  &:not(:hover) {
    background-color: transparent !important;
  }

  &:active {
    background: rgba(0, 180, 255, 0.25) !important;
  }
}

//大屏下拉菜单
.header-dropdownPop {
  background: rgba(10, 30, 60, 0.95) !important;
  border: 1px solid rgba(0, 180, 255, 0.5) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.3),
    inset 0 0 15px rgba(0, 60, 120, 0.5) !important;
  padding: 10px 10px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  z-index: 9999 !important;
  animation: dropdown-appear 0.3s ease-out;

  // 顶部扫描线
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 180, 255, 0.8) 50%,
        transparent 100%);
    filter: blur(1px);
  }

  // 底部扫描线
  &::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 180, 255, 0.8) 50%,
        transparent 100%);
    filter: blur(1px);
  }

  // 菜单项样式
  .el-dropdown-menu__item {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    position: relative;

    &:hover {
      background: rgba(0, 120, 215, 0.15) !important;

      .tech-dropdown-item .tech-beam {
        opacity: 1;
      }
    }

    &:active {
      background: rgba(0, 120, 215, 0.25) !important;
    }

    .tech-dropdown-item {
      display: flex;
      align-items: center;
      padding: 0 10px;
      position: relative;

      .dropdown-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(0, 180, 255, 0.9);
      }

      span {
        font-family: "DINAlternate", "Orbitron", sans-serif;
        font-size: 14px;
        letter-spacing: 1px;
        text-shadow: 0 0 8px rgba(0, 180, 255, 0.4);
      }

      .tech-beam {
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 180, 255, 0.8) 50%,
            transparent 100%);
        opacity: 0;
        transition: opacity 0.3s;
      }
    }
  }

  // 角落装饰
  .tech-dropdown-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 5;

    &.top-left {
      top: 0;
      left: 0;
      border-top: 1px solid rgba(0, 180, 255, 0.7);
      border-left: 1px solid rgba(0, 180, 255, 0.7);
    }

    &.top-right {
      top: 0;
      right: 0;
      border-top: 1px solid rgba(0, 180, 255, 0.7);
      border-right: 1px solid rgba(0, 180, 255, 0.7);
    }

    &.bottom-right {
      bottom: 0;
      right: 0;
      border-bottom: 1px solid rgba(0, 180, 255, 0.7);
      border-right: 1px solid rgba(0, 180, 255, 0.7);
    }

    &.bottom-left {
      bottom: 0;
      left: 0;
      border-bottom: 1px solid rgba(0, 180, 255, 0.7);
      border-left: 1px solid rgba(0, 180, 255, 0.7);
    }
  }

  // 扫描线动画
  .tech-dropdown-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(0, 180, 255, 0) 0%,
        rgba(0, 180, 255, 0.8) 50%,
        rgba(0, 180, 255, 0) 100%);
    opacity: 0.6;
    filter: blur(1px);
    z-index: 2;
    animation: dropdown-scan 2s linear infinite;
  }
}

@keyframes dropdown-scan {
  0% {
    top: 0;
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes dropdown-appear {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes border-flow {
  0% {
    border-image-source: linear-gradient(to right,
        rgba(0, 180, 255, 0) 0%,
        rgba(0, 180, 255, 0.5) 25%,
        rgba(0, 180, 255, 0.8) 50%,
        rgba(0, 180, 255, 0.5) 75%,
        rgba(0, 180, 255, 0) 100%);
  }

  50% {
    border-image-source: linear-gradient(to right,
        rgba(0, 180, 255, 0.5) 0%,
        rgba(0, 180, 255, 0.8) 25%,
        rgba(0, 180, 255, 0.5) 50%,
        rgba(0, 180, 255, 0) 75%,
        rgba(0, 180, 255, 0.5) 100%);
  }

  100% {
    border-image-source: linear-gradient(to right,
        rgba(0, 180, 255, 0) 0%,
        rgba(0, 180, 255, 0.5) 25%,
        rgba(0, 180, 255, 0.8) 50%,
        rgba(0, 180, 255, 0.5) 75%,
        rgba(0, 180, 255, 0) 100%);
  }
}
</style>
